public class Calculator
{
    public int Calculate(int a, int b, IOperation operation)
    {
        return operation.Calculate(a, b);
    }

    public IOperation GetOperation(string operation)
    {
        return operation switch
        {
            "+" => new AddOperation(),
            "-" => new SubOperation(),
            "*" => new MultiplicationOperation(),
            "/" => new DivisionOperation(),
            _ => throw new InvalidOperationException("Invalid operation"),
        };
    }
}